package com.ljxt.dt.vo;

import java.util.List;

/**
 * 映射菜单栏生成的树形结构Vo
 * @author 徐浩钦
 * @version 1.0.0
 * @date 2020/5/9 8:51
 * @copyright 老九学堂T11
 */
public class TreeVo<ID, T> {
    /**
     * 节点编号 - （唯一）
     */
    private ID id;

    /**
     * 节点显示的文本
     */
    private String text;

    /**
     * 节点的链接地址
     */
    private String href;

    /**
     * 节点所属的父节点编号
     */
    private ID parentId;

    /**
     * 节点所属的子节点数据
     */
    private List<TreeVo<ID,T>> children;

    /**
     * 节点关联的原始数据
     */
    private T raw;

    @Override
    public String toString() {
        return "TreeVo{" +
                "id=" + id +
                ", text='" + text + '\'' +
                ", href='" + href + '\'' +
                ", parentId=" + parentId +
                ", children=" + children +
                ", raw=" + raw +
                '}';
    }

    public ID getId() {
        return id;
    }

    public void setId(ID id) {
        this.id = id;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getHref() {
        return href;
    }

    public void setHref(String href) {
        this.href = href;
    }

    public ID getParentId() {
        return parentId;
    }

    public void setParentId(ID parentId) {
        this.parentId = parentId;
    }

    public List<TreeVo<ID, T>> getChildren() {
        return children;
    }

    public void setChildren(List<TreeVo<ID, T>> children) {
        this.children = children;
    }

    public T getRaw() {
        return raw;
    }

    public void setRaw(T raw) {
        this.raw = raw;
    }
}
